<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>确认支付</title>
</head>
<body>

<script src="/static/js/jquery-1.11.3.js"></script>

<button id="btn">确认支付</button>

<script>
    var order_id = "1630930468"
    var post_data = {"order_id": order_id}
    $(function(){
        $('#btn').click(function(){
            $.ajax({
                url:'http://127.0.0.1:8000/payment/url',
                type:'post',
                contentType:'json',
                data:JSON.stringify(post_data),
                success:function(data){
                    window.location.href=data.pay_url
                }
            })
        })
    })
</script>

</body>
</html>